<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>OpenLayers v8.2.0 API - Class: WMTSTileGrid</title>
    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
        crossorigin="anonymous"></script>
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/fontawesome.min.css"
        crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/solid.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css"
        href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/brands.css" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="styles/prettify-tomorrow.css">
    <link rel="stylesheet" type="text/css" href="styles/jaguar.css">
    <link rel="stylesheet" type="text/css" href="styles/carbon.css">
    <link rel="stylesheet" type="text/css" href="/theme/ol.css">
    <link rel="stylesheet" type="text/css" href="/theme/site.css">
</head>

<body>
    <header class="navbar navbar-expand-sm navbar-dark mb-3 px-3 py-0 fixed-top" role="navigation">
        <a class="navbar-brand" href="/"><img src="/theme/img/logo-dark.svg" width="70" height="70"
                alt="">&nbsp;OpenLayers</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#olmenu"
            aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <!-- menu items that get hidden below 768px width -->
        <nav class="collapse navbar-collapse" id="olmenu">
            <ul class="nav navbar-nav ms-auto">
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button"
                        data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
                    <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="docdropdown">
                        <a class="dropdown-item" href="/doc/">Docs</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="/doc/quickstart.html"><i
                                class="fa fa-check fa-fw me-2 fa-lg"></i>快速入门</a>
                        <a class="dropdown-item" href="/doc/faq.html"><i
                                class="fa fa-question fa-fw me-2 fa-lg"></i>FAQ</a>
                        <a class="dropdown-item" href="/doc/tutorials/"><i
                                class="fa fa-book fa-fw me-2 fa-lg"></i>Tutorials</a>
                        <div class="dropdown-divider"></div>
                        <a class="dropdown-item" href="https://stackoverflow.com/questions/tagged/openlayers"><i
                                class="fab fa-stack-overflow fa-fw me-2"></i>Ask a Question</a>
                    </div>
                </li>
                <li class="nav-item"><a class="nav-link" href="/en/latest/examples/">Examples</a></li>
                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="apidropdown" role="button"
                        data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-sitemap me-1"></i>API
                    </a>
                    <div class="dropdown-menu dropdown-menu-end mb-3" aria-labelledby="apidropdown">
                        <a class="dropdown-item" href="/en/latest/apidoc/"><i
                                class="fa fa-sitemap fa-fw me-2 fa-lg"></i>v8.2.0
                            (latest)</a </div>
                </li>
            </ul>
        </nav>
    </header>

    <div class="container-fluid">
        <div id="wrap" class="row">
            <div class="navigation col-md-4 col-lg-3">
                <div class="search-wrapper">
                    <div class="search">
                        <input id="search" type="text" autocomplete="off" class="form-control input-sm"
                            placeholder="Search Documentation">
                    </div>
                </div>
                <div class="navigation-list-wrapper">
                    <ul class="navigation-list search-empty">
                        <li class="item item-class toggle-manual toggle-manual-show"
                            data-longname="module:ol/tilegrid/WMTS~WMTSTileGrid" data-name="ol/tilegrid/wmts">
                            <span class="title toggle">
                                <span class="fa fa-chevron-right me-2 mt-1"></span>
                                <span><a href="module-ol_tilegrid_WMTS-WMTSTileGrid.html">ol​/tilegrid​/WMTS</a></span>
                            </span>
                            <div class="member-list" data-type="methods">
                                <span class="subtitle">Methods</span>
                                <ul>
                                    <li data-name="foreachtilecoord"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#forEachTileCoord">forEachTileCoord</a>
                                    <li data-name="getextent"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getExtent">getExtent</a>
                                    <li data-name="getmatrixids"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getMatrixIds">getMatrixIds</a>
                                    <li data-name="getmaxzoom"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getMaxZoom">getMaxZoom</a>
                                    <li data-name="getminzoom"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getMinZoom">getMinZoom</a>
                                    <li data-name="getorigin"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getOrigin">getOrigin</a>
                                    <li data-name="getresolution"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getResolution">getResolution</a>
                                    <li data-name="getresolutions"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getResolutions">getResolutions</a>
                                    <li data-name="gettilecoordextent"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getTileCoordExtent">getTileCoordExtent</a>
                                    <li data-name="gettilecoordforcoordandresolution"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getTileCoordForCoordAndResolution">getTileCoordForCoordAndResolution</a>
                                    <li data-name="gettilecoordforcoordandz"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getTileCoordForCoordAndZ">getTileCoordForCoordAndZ</a>
                                    <li data-name="gettilesize"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getTileSize">getTileSize</a>
                                    <li data-name="getzforresolution"><a
                                            href="module-ol_tilegrid_WMTS-WMTSTileGrid.html#getZForResolution">getZForResolution</a>
                                </ul>
                            </div>
                        <li class="loading">Loading …
                    </ul>
                </div>
            </div>

            <div class="main col-md-8 col-lg-9">
                <h1 class="page-title" data-filename="module-ol_tilegrid_WMTS-WMTSTileGrid.html">Class: WMTSTileGrid
                </h1>
                <div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
                    <button id="latest-dismiss" type="button" class="btn-close" data-bs-dismiss="alert"
                        aria-label="Close"></button>
                    This documentation is for OpenLayers v<span id="package-version">8.2.0</span>. The <a
                        id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
                </div>




                <section class="content">

                    <header>
                        <h2 class="my-3">
                            <span class="ancestors"><a
                                    href="module-ol_tilegrid_WMTS.html">ol/tilegrid/WMTS</a>~</span>WMTSTileGrid
                        </h2>
                        <br>



                        <pre
                            class="prettyprint source"><code>import WMTSTileGrid from '<a href="module-ol_tilegrid_WMTS.html">ol/tilegrid/WMTS</a>.js';</code></pre>


                        <div class="row p-3 ">
                            <!-- <div id="ad" class="col-lg-5 order-2 align-self-center border rounded bg-light ">
                                <script async type="text/javascript"
                                    src="https://cdn.carbonads.com/carbon.js?serve=CE7DV53U&placement=openlayersorg"
                                    id="_carbonads_js"></script>
                            </div> -->

                            <div class="class-description col-lg-7 align-self-center ps-0">
                                <p>Set the grid pattern for sources accessing WMTS tiled-image servers.</p>
                            </div>

                        </div>
                    </header>

                    <article>
                        <div class="container-overview">



                            <dl>

                                <dt class="">

                                    <div class="nameContainer">
                                        <div class="anchor" id="WMTSTileGrid">
                                        </div>
                                        <h4 class="name">
                                            new WMTSTileGrid<span class="signature">(options)</span>



                                        </h4>

                                        <div class="tag-source">
                                            <a
                                                href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/WMTS.js">tilegrid/WMTS.js</a>,
                                            <a
                                                href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/WMTS.js#L45">line
                                                45</a>
                                        </div>

                                    </div>


                                </dt>
                                <dd class="">













                                    <table class="params">
                                        <thead>
                                            <tr>

                                                <th>Name</th>


                                                <th>Type</th>

                                                <th class="last">Description</th>
                                            </tr>
                                        </thead>

                                        <tbody>


                                            <tr class="">

                                                <td class="name"><code>extent</code></td>



                                                <td class="type">


                                                    <span class="param-type"><a
                                                            href="module-ol_extent.html#~Extent">Extent</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>Extent for the tile grid. No tiles
                                                        outside this extent will be requested by <a
                                                            href="module-ol_source_Tile-TileSource.html"><code>TileSource</code></a>
                                                        sources.
                                                        When no <code>origin</code> or <code>origins</code> are
                                                        configured, the <code>origin</code> will be set to the
                                                        top-left corner of the extent.</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>origin</code></td>



                                                <td class="type">


                                                    <span class="param-type"><a
                                                            href="module-ol_coordinate.html#~Coordinate">Coordinate</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>The tile grid origin, i.e.
                                                        where the <code>x</code> and <code>y</code> axes meet
                                                        (<code>[z, 0, 0]</code>). Tile coordinates increase left
                                                        to right and downwards. If not specified, <code>extent</code> or
                                                        <code>origins</code> must be provided.
                                                    </p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>origins</code></td>



                                                <td class="type">


                                                    <span class="param-type">Array&lt;<a
                                                            href="module-ol_coordinate.html#~Coordinate">Coordinate</a>></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>Tile grid origins,
                                                        i.e. where the <code>x</code> and <code>y</code> axes meet
                                                        (<code>[z, 0, 0]</code>), for each zoom level. If
                                                        given, the array length should match the length of the
                                                        <code>resolutions</code> array, i.e.
                                                        each resolution can have a different origin. Tile coordinates
                                                        increase left to
                                                        right and downwards. If not specified, <code>extent</code> or
                                                        <code>origin</code> must be provided.
                                                    </p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>resolutions</code></td>



                                                <td class="type">


                                                    <span class="param-type">Array.&lt;number></span>




                                                </td>



                                                <td class="description last">

                                                    <p>Resolutions. The array index of each
                                                        resolution needs to match the zoom level. This means that even
                                                        if a <code>minZoom</code>
                                                        is configured, the resolutions array will have a length of
                                                        <code>maxZoom + 1</code>
                                                    </p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>matrixIds</code></td>



                                                <td class="type">


                                                    <span class="param-type">Array.&lt;string></span>




                                                </td>



                                                <td class="description last">

                                                    <p>matrix IDs. The length of this array needs
                                                        to match the length of the <code>resolutions</code> array.</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>sizes</code></td>



                                                <td class="type">


                                                    <span class="param-type">Array&lt;<a
                                                            href="module-ol_size.html#~Size">Size</a>></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>Number of tile rows and columns
                                                        of the grid for each zoom level. The values here are the
                                                        <code>TileMatrixWidth</code> and
                                                        <code>TileMatrixHeight</code> advertised in the GetCapabilities
                                                        response of the WMTS, and
                                                        define each zoom level's extent together with the
                                                        <code>origin</code> or <code>origins</code>.
                                                        A grid <code>extent</code> can be configured in addition, and
                                                        will further limit the extent for
                                                        which tile requests are made by sources. If the bottom-left
                                                        corner of
                                                        an extent is used as <code>origin</code> or
                                                        <code>origins</code>, then the <code>y</code> value must be
                                                        negative because OpenLayers tile coordinates use the top left as
                                                        the origin.
                                                    </p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>tileSize</code></td>



                                                <td class="type">


                                                    <span class="param-type">number</span>
                                                    |

                                                    <span class="param-type"><a
                                                            href="module-ol_size.html#~Size">Size</a></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>Tile size.</p>
                                                </td>
                                            </tr>



                                            <tr class="">

                                                <td class="name"><code>tileSizes</code></td>



                                                <td class="type">


                                                    <span class="param-type">Array.&lt;(number|<a
                                                            href="module-ol_size.html#~Size">module:ol/size~Size</a>)></span>

                                                    | undefined


                                                </td>



                                                <td class="description last">

                                                    <p>Tile sizes. The length of
                                                        this array needs to match the length of the
                                                        <code>resolutions</code> array.
                                                    </p>
                                                </td>
                                            </tr>


                                        </tbody>
                                    </table>




                                    <dl class="details">





















                                    </dl>













                                </dd>

                            </dl>

                        </div>




                        <h3 class="subsection-title">Extends</h3>

                        <ul>
                            <li><a href="module-ol_tilegrid_TileGrid-TileGrid.html">TileGrid</a></li>
                        </ul>















                        <h3 class="subsection-title">Methods</h3>

                        <dl>


                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="forEachTileCoord">
                                    </div>
                                    <h4 class="name">
                                        forEachTileCoord<span class="signature">(extent, zoom, callback)</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#forEachTileCoord">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L235">line
                                            235</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Call a function with each tile coordinate for a given extent and zoom level.</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>extent</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_extent.html#~Extent">Extent</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Extent.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>zoom</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>




                                            </td>



                                            <td class="description last">

                                                <p>Integer zoom level.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>callback</code></td>



                                            <td class="type">


                                                <span class="param-type">function</span>




                                            </td>



                                            <td class="description last">

                                                <p>Function called with each tile coordinate.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>













                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getExtent">
                                    </div>
                                    <h4 class="name">
                                        getExtent<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_extent.html#~Extent">Extent</a>}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getExtent">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L291">line
                                            291</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the extent for this tile grid, if it was configured.</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Extent.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer">
                                    <div class="anchor" id="getMatrixIds">
                                    </div>
                                    <h4 class="name">
                                        getMatrixIds<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{Array.&lt;string>}</span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/WMTS.js">tilegrid/WMTS.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/WMTS.js#L80">line
                                            80</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the list of matrix identifiers.</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                MatrixIds.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getMaxZoom">
                                    </div>
                                    <h4 class="name">
                                        getMaxZoom<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{number}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getMaxZoom">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L300">line
                                            300</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the maximum zoom level for the grid.</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Max zoom.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getMinZoom">
                                    </div>
                                    <h4 class="name">
                                        getMinZoom<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{number}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getMinZoom">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L309">line
                                            309</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the minimum zoom level for the grid.</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Min zoom.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getOrigin">
                                    </div>
                                    <h4 class="name">
                                        getOrigin<span class="signature">(z)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_coordinate.html#~Coordinate">Coordinate</a>}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getOrigin">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L319">line
                                            319</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the origin for the grid at the given zoom level.</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>z</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>




                                            </td>



                                            <td class="description last">

                                                <p>Integer zoom level.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Origin.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getResolution">
                                    </div>
                                    <h4 class="name">
                                        getResolution<span class="signature">(z)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{number}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getResolution">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L332">line
                                            332</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the resolution for the given zoom level.</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>z</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>




                                            </td>



                                            <td class="description last">

                                                <p>Integer zoom level.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Resolution.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getResolutions">
                                    </div>
                                    <h4 class="name">
                                        getResolutions<span class="signature">()</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{Array.&lt;number>}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getResolutions">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L341">line
                                            341</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the list of resolutions for the tile grid.</p>
                                </div>











                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Resolutions.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getTileCoordExtent">
                                    </div>
                                    <h4 class="name">
                                        getTileCoordExtent<span class="signature">(tileCoord, <span
                                                class="optional">tempExtent</span>)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_extent.html#~Extent">Extent</a>}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getTileCoordExtent">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L458">line
                                            458</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the extent of a tile coordinate.</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>tileCoord</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_tilecoord.html#~TileCoord">TileCoord</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Tile coordinate.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>tempExtent</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_extent.html#~Extent">Extent</a></span>

                                                | undefined


                                            </td>



                                            <td class="description last">

                                                <p>Temporary extent object.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Extent.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getTileCoordForCoordAndResolution">
                                    </div>
                                    <h4 class="name">
                                        getTileCoordForCoordAndResolution<span class="signature">(coordinate,
                                            resolution, <span class="optional">opt_tileCoord</span>)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_tilecoord.html#~TileCoord">TileCoord</a>}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getTileCoordForCoordAndResolution">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L480">line
                                            480</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the tile coordinate for the given map coordinate and resolution. This
                                        method considers that coordinates that intersect tile boundaries should be
                                        assigned the higher tile coordinate.</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>coordinate</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_coordinate.html#~Coordinate">Coordinate</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Coordinate.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>resolution</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>




                                            </td>



                                            <td class="description last">

                                                <p>Resolution.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>opt_tileCoord</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_tilecoord.html#~TileCoord">TileCoord</a></span>

                                                | undefined


                                            </td>



                                            <td class="description last">

                                                <p>Destination module:ol/tilecoord~TileCoord object.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Tile coordinate.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getTileCoordForCoordAndZ">
                                    </div>
                                    <h4 class="name">
                                        getTileCoordForCoordAndZ<span class="signature">(coordinate, z, <span
                                                class="optional">opt_tileCoord</span>)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{<a
                                                href="module-ol_tilecoord.html#~TileCoord">TileCoord</a>}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getTileCoordForCoordAndZ">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L571">line
                                            571</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get a tile coordinate given a map coordinate and zoom level.</p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>coordinate</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_coordinate.html#~Coordinate">Coordinate</a></span>




                                            </td>



                                            <td class="description last">

                                                <p>Coordinate.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>z</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>




                                            </td>



                                            <td class="description last">

                                                <p>Integer zoom level, e.g. the result of a
                                                    <code>getZForResolution()</code> method call
                                                </p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>opt_tileCoord</code></td>



                                            <td class="type">


                                                <span class="param-type"><a
                                                        href="module-ol_tilecoord.html#~TileCoord">TileCoord</a></span>

                                                | undefined


                                            </td>



                                            <td class="description last">

                                                <p>Destination module:ol/tilecoord~TileCoord object.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Tile coordinate.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getTileSize">
                                    </div>
                                    <h4 class="name">
                                        getTileSize<span class="signature">(z)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{number | <a
                                                href="module-ol_size.html#~Size">Size</a>}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getTileSize">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L597">line
                                            597</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">




                                <div class="description">
                                    <p>Get the tile size for a zoom level. The type of the return value matches the
                                        <code>tileSize</code> or <code>tileSizes</code> that the tile grid was
                                        configured with. To always
                                        get an <a href="module-ol_size.html#~Size"><code>Size</code></a>, run the result
                                        through <a href="module-ol_size.html#.toSize"><code>toSize</code></a>.
                                    </p>
                                </div>










                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>z</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>




                                            </td>



                                            <td class="description last">

                                                <p>Z.</p>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Tile size.
                                <br />




                            </dd>




                            <dt class="">

                                <div class="nameContainer inherited">
                                    <div class="anchor" id="getZForResolution">
                                    </div>
                                    <h4 class="name">
                                        getZForResolution<span class="signature">(resolution, <span
                                                class="optional">opt_direction</span>)</span><span
                                            class="fa fa-arrow-circle-right"></span><span
                                            class="type-signature returnType">{number}</span>

                                        <span class="inherited"><a
                                                href="module-ol_tilegrid_TileGrid-TileGrid.html#getZForResolution">inherited</a></span>



                                    </h4>

                                    <div class="tag-source">
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js">tilegrid/TileGrid.js</a>,
                                        <a
                                            href="https://github.com/openlayers/openlayers/blob/v8.2.0/src/ol/tilegrid/TileGrid.js#L634">line
                                            634</a>
                                    </div>

                                </div>


                            </dt>
                            <dd class="">













                                <table class="params">
                                    <thead>
                                        <tr>

                                            <th>Name</th>


                                            <th>Type</th>

                                            <th class="last">Description</th>
                                        </tr>
                                    </thead>

                                    <tbody>


                                        <tr class="">

                                            <td class="name"><code>resolution</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>




                                            </td>



                                            <td class="description last">

                                                <p>Resolution.</p>
                                            </td>
                                        </tr>



                                        <tr class="">

                                            <td class="name"><code>opt_direction</code></td>



                                            <td class="type">


                                                <span class="param-type">number</span>
                                                |

                                                <span class="param-type"><a
                                                        href="module-ol_array.html#~NearestDirectionFunction">NearestDirectionFunction</a></span>

                                                | undefined


                                            </td>



                                            <td class="description last">

                                                <p>If 0, the nearest resolution will be used.
                                                    If 1, the nearest higher resolution (lower Z) will be used. If -1,
                                                    the
                                                    nearest lower resolution (higher Z) will be used. Default is 0.
                                                    Use a <a
                                                        href="module-ol_array.html#~NearestDirectionFunction"><code>NearestDirectionFunction</code></a>
                                                    for more precise control.</p>
                                                <p>For example to change tile Z at the midpoint of zoom levels</p>
                                                <pre class="prettyprint source lang-js"><code>function(value, high, low) {
  return value - low * Math.sqrt(high / low);
}</code></pre>
                                            </td>
                                        </tr>


                                    </tbody>
                                </table>




                                <dl class="details">





















                                </dl>















                                <h5>Returns:</h5>
                                Z.
                                <br />




                            </dd>

                        </dl>





                    </article>

                </section>




            </div>
        </div>
    </div>
    <script>prettyPrint();</script>
    <script src="scripts/linenumber.js"></script>
    <script src="scripts/main.js"></script>
</body>

</html>